function [r,dr_dh] = coverageModel(h,para,model_name)
% output: r, the radius of coverage circle on the ground.
% input: h, the height of flying
% input: model_name, two kinds, "proportional" or "reciprocal".
% proportional model assuming a FOV of the sensor, like sqrt(3)*h
% reciprocal model assuming a constant transmitting distance of
% sensor like sqrt(400-h^2)

    if strcmp(model_name,'proportional')
        angle = para; theta = angle*3.1415926/180;
        r = tan(theta) .* h;
        dr_dh = tan(theta);
    elseif strcmp(model_name,'reciprocal')
        trans_length = para;
        r = sqrt(trans_length^2-h.^2);
        dr_dh = -h./r;
    else
        r = 0;dr_dh = 0;
    end
end

